From 563e6b46901cef2391dbc32e3f019650aeeb4545 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Wed, 15 Nov 2006 09:44:12 +0000 Subject: [PATCH] Add the VNC port to the output of xm list --long, if the value has been written to xenstore by QEMU. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 80d18f06cf..ab3c79356d 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1659,9 +1659,17 @@ class XendDomainInfo: log.trace("XendDomainInfo.update done on domain %s: %s", str(self.domid), self.info) - def sxpr(self, ignore_devices = False): - return self.info.get_sxp(domain = self, - ignore_devices = ignore_devices) + def sxpr(self, ignore_store = False): + result = self.info.get_sxp(domain = self, + ignore_devices = ignore_store) + + if not ignore_store: + vnc_port = self._readDom('console/vnc-port') + if vnc_port is not None: + result.append(['device', + ['console', ['vnc-port', str(vnc_port)]]]) + + return result # Xen API # ---------------------------------------------------------------- -- 2.30.2